package org.gdstash.ui.table;

import org.gdstash.item.GDItem;
import org.gdstash.util.GDMsgFormatter;

import javax.swing.*;

public class GDItemNameRow {
    public static final Class[] COLUMN_CLASSES;
    public static String[] columnNames;
    public GDItem item;
    public String baseName;
    public ImageIcon icon;
    public GDItem.LabelInfo name;
    public GDItem.LabelInfo level;

    public static void updateColumnNames() {
        if (GDItemNameRow.columnNames == null) {
            GDItemNameRow.columnNames = new String[3];
        }
        GDItemNameRow.columnNames[0] = GDMsgFormatter.getString(GDMsgFormatter.rbUI, "TXT_PICTURE");
        GDItemNameRow.columnNames[1] = GDMsgFormatter.getString(GDMsgFormatter.rbUI, "TXT_ITEM_NAME");
        GDItemNameRow.columnNames[2] = GDMsgFormatter.getString(GDMsgFormatter.rbUI, "TXT_LEVEL");
    }

    static {
        COLUMN_CLASSES = new Class[]{Icon.class, String.class, String.class};
        GDItemNameRow.columnNames = null;
        updateColumnNames();
    }
}
